<template>
  <page-loading :show="pageLoading">
    <view>
      <view class="container" v-if="info">
        <view class="header">
          <view class="header-left">
            <i-icon
              icon="icondingdandengdai"
              type="single"
              size="34rpx"
              color="#333"
            ></i-icon>
            <!-- <i-icon :icon="statusIcon[info.quote_status]" type="single" size="34rpx" color="#333"></i-icon> -->
            <text class="text">待报价</text>
            <!-- <text class="text">{{ status[info.quote_Status] }}</text> -->
          </view>
          <view class="header-right">
            <text style="font-weight: 500; font-size: 24rpx"
              >剩余报价时间：</text
            >
            <text>{{ remainder }}</text>
          </view>
        </view>

        <!-- 车型模块 -->
        <view class="order" v-if="info">
          <view class="item flex">
            <view class="item-left">车型：</view>
            <view class="item-right name"
              >{{ info.brand_Name }} {{ info.car_Type_Name }}
              {{ info.configuration_Name }}</view
            >
          </view>
          <view class="item flex vin" v-if="info.vin_No">
            <view class="item-left">VIN:</view>
            <view class="item-right">{{ info.vin_No }}</view>
          </view>
          <view class="item flex">
            <view class="item-left">询价主体：</view>
            <view class="item-right">
              <text>{{ info.store_Name }}</text>
              <i-icon
                v-if="info.store_Status"
                class="icon-store"
                icon="iconmendianrenzheng"
                type="single"
                size="32rpx"
                color="#60C534"
              ></i-icon>
              <i-icon
                v-if="info.deposit_Balance > 0"
                class="icon-store"
                icon="iconbao_1"
                type="single"
                size="28rpx"
                color="#eb5c02"
              ></i-icon>
            </view>
          </view>
          <view class="item flex">
            <view class="item-left">联系人：</view>
            <view class="item-right">{{ formatName }}</view>
          </view>
          <view class="item flex">
            <view class="item-left">联系电话：</view>
            <view class="item-right flex flex-jc-sb">
              <text>{{ formatPhone }}</text>
              <text class="phone-tip">报价后可见联系买方</text>
            </view>
          </view>
          <view class="item flex">
            <view class="item-left">收货地址：</view>
            <view class="item-right"
              >{{ info.receiver_Address_Json.province
              }}{{ info.receiver_Address_Json.city
              }}{{ info.receiver_Address_Json.district
              }}{{ info.receiver_Address_Json.address }}</view
            >
          </view>
          <view class="item flex">
            <view class="item-left">询价日期：</view>
            <view class="item-right">{{ dateFormat(info.addTime) }}</view>
          </view>
          <view class="item flex">
            <view class="item-left">截至日期：</view>
            <view class="item-right">{{
              dateFormat(info.effective_Time)
            }}</view>
            <view class="last-time">
              {{ remainder }}
            </view>
          </view>
          <view class="item flex">
            <view class="item-left">发票信息：</view>
            <view class="item-right">{{
              info.is_Need_Invoice ? '需开发票' : '不需开票'
            }}</view>
          </view>
        </view>
        <!-- 询价清单 -->
        <view class="enMolder boxS">
          <view class="enMolder-head">询价清单</view>
          <view
            class="enMolder-item"
            v-for="(item, index) in info.carPartDetails"
            :key="index"
          >
            <view class="enMolder1">
              <view class="en-left">
                <view class="en-left-num">
                  <view class="en-num">{{ index + 1 }}</view>
                </view>

                <view class="en-name">{{ item.part_Category_Name }}</view>
              </view>
              <view class="en-right">x{{ item.purchase_Number }}</view>
            </view>
            <view class="enMolderImg" v-if="item.images">
              <image
                v-for="img in handdleImg(item.images)"
                :key="img"
                :src="img"
              ></image>
            </view>
            <view class="enMolder2">
              <view class="en-left">品质:</view>
              <view class="en-right text-line2">{{
                quality[info.character_Type]
              }}</view>
            </view>
            <view class="enMolder2">
              <view class="en-left">说明:</view>
              <view class="en-right text-line2">{{ item.explain_Text }}</view>
            </view>
          </view>
        </view>

        <view class="inforTwo">
          <view>
            <text style="color: #eb5c02">{{ info.browse_Number }}次</text>
            浏览/
            <text style="color: #eb5c02">{{ info.quote_Number }}家</text>
            供应商参与报价
          </view>
          <view></view>
        </view>
        <view class="people">
          <view
            class="p-item flex"
            v-for="(item, index) in biddingList"
            :key="index"
          >
            <view class="img">
              <image
                v-if="item.headportrait"
                :src="item.headportrait"
                mode="aspectFill"
              ></image>
              <i-icon
                v-else
                icon="iconmorentouxiang"
                type="multiple"
                size="70rpx"
              ></i-icon>
            </view>
            <view class="p-name">{{ item.name }}</view>
            <view class="p-tip">参与报价</view>
            <view class="p-date">{{
              dateFormat(item.addTime, 'MM月DD日 HH:mm:ss')
            }}</view>
          </view>
        </view>
        <view class="bid-text">{{ bidText }}</view>

        <!-- 已报价 -->
        <button
          class="footer1"
          @click="Iwantaquote"
          v-if="storeId !== info.store_Id"
        >
          <view class="footbox">
            <view class="wanc"> 我要报价 </view>
            <view class="fangshi"> 报价后可见寻件方联系方式 </view>
          </view>
        </button>
      </view>
    </view></page-loading
  >
</template>

<script src="./inquiryDetails.js"></script>
<style lang="scss" scoped>
@import './inquiryDetails.scss';
</style>
